package com.gupao.proxy.dbroute;

import com.gupao.proxy.dbroute.db.DynamicDataSourceEntity;
import com.gupao.proxy.dbroute.proxy.DynamicOrderServiceProxy;

import java.util.Date;

public class DbRouteDynamicTest {
    public static void main(String[] args) {
        DynamicOrderServiceProxy dynamicOrderServiceProxy = new DynamicOrderServiceProxy();
        IOrderService orderService = (IOrderService) dynamicOrderServiceProxy.getInstance(new OrderService());
        Order order = new Order();
        order.setCreateTime(new Date().getTime());
        orderService.createOrder(order);
        System.out.println(DynamicDataSourceEntity.get());
    }
}
